use warp::reply::Json;
use serde::Serialize;

#[derive(Serialize)]
struct VersionInfo {
    version: String,
}

pub async fn handle_version() -> Result<Json, warp::Rejection> {
    let version_info = VersionInfo {
        version: "1.0.0".to_string(),
    };
    Ok(warp::reply::json(&version_info))
}